package com.bdqn.qnnews.article.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author xlz
 * @since 2023-12-22
 * @description 文章信息表，存储已发布的文章
 */
@Data
// 链式语法
@Accessors(chain = true)
@TableName("ap_article")
@Schema(name = "ApArticle 对象", description = "文章信息表，存储已发布的文章 实体类")
public class ApArticle {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "文章作者的ID")
    private Long authorId;

    @Schema(description = "作者昵称")
    private String authorName;

    @Schema(description = "文章所属频道ID")
    private Long channelId;

    @Schema(description = "频道名称")
    private String channelName;

    @Schema(description = "文章布局	            0 无图文章	            1 单图文章	            2 多图文章")
    private Byte layout;

    @Schema(description = "文章标记	            0 普通文章	            1 热点文章	            2 置顶文章	            3 精品文章	            4 大V 文章")
    private Byte flag;

    @Schema(description = "文章图片	            多张逗号分隔")
    private String images;

    @Schema(description = "文章标签最多3个 逗号分隔")
    private String labels;

    @Schema(description = "点赞数量")
    private Integer likes;

    @Schema(description = "收藏数量")
    private Integer collection;

    @Schema(description = "评论数量")
    private Integer comment;

    @Schema(description = "阅读数量")
    private Integer views;

    @Schema(description = "省市")
    private Integer provinceId;

    @Schema(description = "市区")
    private Integer cityId;

    @Schema(description = "区县")
    private Integer countyId;

    @Schema(description = "创建时间")
    private LocalDateTime createdTime;

    @Schema(description = "发布时间")
    private LocalDateTime publishTime;

    @Schema(description = "同步状态")
    private Boolean syncStatus;

    @Schema(description = "来源")
    private Byte origin;

    private String staticUrl;


}
